<html>
<head>
<title>eLGU - RPTS - {TITLE}</title>
<script language="Javascript" src="js/numeric.js"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function openWin(strLink, strWindow, intLeft, intTop, intWidth, intHeight){
	puffup = window.open(strLink, strWindow, "position:absolute; left="+intLeft+", top="+intTop+", width="+intWidth+", height="+intHeight+", toolbar=no, scrollbars=yes, resizable=yes, menubar=no, location=no, status=no");
	puffup.focus(true);
}
function checkAction(axn){
	document.OwnerList.formAction.value = axn;
	if (confirmSubmit())
	document.OwnerList.submit();
}
function confirmSubmit(){
	axn = document.OwnerList.formAction.value;
	if(!confirm(axn+' selected items?')){
		return false;
	}
	else
		return true;
}
function toggle(id){
 	obj=document.getElementById('tdRow'+id);
 	if (obj.style.display=='none') {
		obj.style.display='';
		location.href = '#td'+id;
	}
	else {
		obj.style.display='none';
		location.href = '#td';
	}
}
function toggleShowHide(){
	obj = eval('document.RPTOPForm.tdShowHide');
	objArray = 'document.RPTOPForm.tdChk';
	tdCtr = {tdCtr};
	count = tdCtr;
	if (obj.checked){
		toggleAll('');
		i = 0;
		while (i < count){
			eval(objArray+i+'.checked = true');
			i++;
		}
	}
	else {
		toggleAll('none');
		i = 0;
		while (i < count){
			//alert('hello');
			eval(objArray+i+'.checked = false');
			i++;
		}
	}
}
function toggleAll(action){
	<!-- BEGIN toggleTDList -->
		document.getElementById('tdRow{ctr}').style.display=action;
	<!-- END toggleTDList -->
}

function toggleBacktaxTD(id){
 	obj=document.getElementById('backtaxTD'+id);
 	if (obj.style.display=='none') {
		obj.style.display='';
	}
	else {
		obj.style.display='none';
	}
}



function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function setDefaults(){
	MM_preloadImages('images/nav/nav_b_02.jpg','images/nav/nav_b_03.jpg','images/nav/nav_b_04.jpg','images/nav/nav_b_05.jpg','images/nav/nav_b_06.jpg','images/nav/nav_b_07.jpg');
	<!-- BEGIN defaultTDList -->
	//toggle('{ctr}');
	<!-- END defaultTDList -->
	location.href= '#top';
}

function urlEncode(str){
	// The Javascript escape and unescape functions do not correspond
	// with what browsers actually do...
	var SAFECHARS = "0123456789" +					// Numeric
					"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +	// Alphabetic
					"abcdefghijklmnopqrstuvwxyz" +
					"-_.!~*'()";					// RFC2396 Mark characters
	var HEX = "0123456789ABCDEF";

	var plaintext = str;
	var encoded = "";
	for (var i = 0; i < plaintext.length; i++ ) {
		var ch = plaintext.charAt(i);
	    if (ch == " ") {
		    encoded += "+";				// x-www-urlencoded, rather than %20
		} else if (SAFECHARS.indexOf(ch) != -1) {
		    encoded += ch;
		} else {
		    var charCode = ch.charCodeAt(0);
			if (charCode > 255) {
			    alert( "Unicode Character '" 
                        + ch 
                        + "' cannot be encoded using standard URL encoding.\n" +
				          "(URL encoding only supports 8-bit characters.)\n" +
						  "A space (+) will be substituted." );
				encoded += "+";
			} else {
				encoded += "%";
				encoded += HEX.charAt((charCode >> 4) & 0xF);
				encoded += HEX.charAt(charCode & 0xF);
			}
		}
	} // for

	return encoded;
};

function getIsDelinquent(){
	ret = true;
	doc = document.RPTOPForm;
	totalCtr = 0
	if(unformatCurrency(doc.totalNetDue.value)<=0){
		return false;
	}

	for(i=0 ; i<doc.elements.length; i++){
		if(doc.elements[i].type=="checkbox"){
			if(doc.elements[i].name.indexOf("tdChk")==0){
				totalCtr++;
			}
		}
	}

	for(i=0 ; i<totalCtr ; i++){
		penaltyAnnual = document.getElementById("penalty["+i+"][Annual]");
		amnestyAnnual = document.getElementById("amnesty["+i+"][Annual]");
		netDueAnnual = document.getElementById("netDue["+i+"][Annual]");

		penaltyQ1 = document.getElementById("penalty["+i+"][Q1]");
		amnestyQ1 = document.getElementById("amnesty["+i+"][Q1]");
		netDueQ1 = document.getElementById("netDue["+i+"][Q1]");

		penaltyQ2 = document.getElementById("penalty["+i+"][Q2]");
		amnestyQ2 = document.getElementById("amnesty["+i+"][Q2]");
		netDueQ2 = document.getElementById("netDue["+i+"][Q2]");

		penaltyQ3 = document.getElementById("penalty["+i+"][Q3]");
		amnestyQ3 = document.getElementById("amnesty["+i+"][Q3]");
		netDueQ3 = document.getElementById("netDue["+i+"][Q3]");

		penaltyQ4 = document.getElementById("penalty["+i+"][Q4]");
		amnestyQ4 = document.getElementById("amnesty["+i+"][Q4]");
		netDueQ4 = document.getElementById("netDue["+i+"][Q4]");

		// annual
		if(unformatCurrency(penaltyAnnual.value)>0){
			if(amnestyAnnual.value!="Yes"){
				return true;
			}
			if(unformatCurrency(netDueAnnual.value)>0){
				return true;
			}
		}
		// Q1
		else if(unformatCurrency(penaltyQ1.value)>0){
			if(amnestyQ1.value!="Yes"){
				return true;
			}
			if(unformatCurrency(netDueQ1.value)>0){
				return true;
			}
		}
		// Q2
		else if(unformatCurrency(penaltyQ2.value)>0){
			if(amnestyQ2.value!="Yes"){
				return true;
			}
			if(unformatCurrency(netDueQ2.value)>0){
				return true;
			}
		}
		// Q3
		else if(unformatCurrency(penaltyQ3.value)>0){
			if(amnestyQ3.value!="Yes"){
				return true;
			}
			if(unformatCurrency(netDueQ3.value)>0){
				return true;
			}
		}
		// Q4
		else if(unformatCurrency(penaltyQ4.value)>0){
			if(amnestyQ4.value!="Yes"){
				return true;
			}
			if(unformatCurrency(netDueQ4.value)>0){
				return true;
			}
		}
		else{
			ret = false;
		}
	}

	return ret;
}

function showPrintWindow(documentType){
	var isDelinquent;
	isDelinquent = true;
	switch(documentType){
		case "soa":
			url = "StatementOfRealPropertyTaxForm.php{Session}&formAction=view";
			url += "&rptopID=" + urlEncode('{rptopID}');
			url += "&ownerID=" + urlEncode('{ownerID}');
			openPrintWin(url, 'StatementOfRealPropertyTaxForm', 0, 0, 800, 600);
			break;
		case "delinquency":
			isDelinquent = getIsDelinquent();
			if(!isDelinquent){
				alert("SOA appears to have no delinquencies for printing.");
				return false;
			}
			else{
				url = "NoticeOfDelinquencyForm.php{Session}&formAction=view";
				url += "&rptopID=" + urlEncode('{rptopID}');
				url += "&ownerID=" + urlEncode('{ownerID}');
				openPrintWin(url, 'NoticeOfDelinquencyForm', 0, 0, 800, 600);
			}
			break;
	}
}

function openPrintWin(strLink, strWindow, intLeft, intTop, intWidth, intHeight){
	window.open(strLink, strWindow, "position:absolute; left="+intLeft+", top="+intTop+", width="+intWidth+", height="+intHeight+", status=1, toolbar=0, menubar=1, scrollbars=1, resizable=1");
}




//-->
</script>
<link href="css/elgu.css" rel="stylesheet" type="text/css">
</head>
<body BGCOLOR=#999999 link="#333333" vlink="#333333" alink="#333333" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="javascript: setDefaults();"> 
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top"> 
      <table WIDTH=100 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
        <tr> 
          <td> <img SRC="images/inner_01.jpg" WIDTH=18 HEIGHT=9 ></td>
          <td> <img SRC="images/inner_02.jpg" WIDTH=27 HEIGHT=9 ></td>
          <td COLSPAN=2> <img SRC="images/inner_03.jpg" WIDTH=598 HEIGHT=9 ></td>
          <td COLSPAN=3 ROWSPAN=2><img SRC="images/steps/step03.jpg" WIDTH=157 HEIGHT=133 ></td>
        </tr>
        <tr> 
          <td> <img SRC="images/inner_05.jpg" WIDTH=18 HEIGHT=124 ></td>
          <td> <img SRC="images/inner_06.jpg" WIDTH=27 HEIGHT=124 ></td>
          <td COLSPAN=2 bgcolor="#CCCCCC"> <img SRC="images/title/title_treasurer_mod.jpg" WIDTH=598 HEIGHT=124 ></td>
        </tr>
        <tr> 
          <td> <img SRC="images/inner_08.jpg" WIDTH=18 HEIGHT=53 ></td>
          <td> <img SRC="images/inner_09.jpg" WIDTH=27 HEIGHT=53 ></td>
          <td COLSPAN=3 align="left" valign="top" bgcolor="#CCCCCC"> 
            <table WIDTH=702 BORDER=0 CELLPADDING=0 CELLSPACING=0>
	   <tr> 
		<td width="72"> <img SRC="images/nav/nav_a_01.jpg" WIDTH=72 HEIGHT=53 ></td>
		<td align="center" valign="middle" background="images/nav_area_bg.jpg"><table width="100%%" border="0" cellspacing="0" cellpadding="0">

		  <tr align="center"> 
		   <td width="0" align=left class="common" colspan=4><b>{uname}</b> : {today}</td>
		   <td width="0" align=right colspan=5>
		    <a href="TreasurersHome.php{Session}" class="navi" title="Treasurer's Module : Home">TM : Home</a>
		    <font class="navi">&lt;</font>
			<a href="home.php{Session}" class="navi" title="Home">Home</a>		    
		    <font class="navi">|</font>
			<a href="Logout.php" class="navi" title="Logout">Logout</a>
			<br>&nbsp;
		   </td>
		  </tr>

		  <tr align="center"> 
		   <td width="0" nowrap align=center colspan=9 class="navi">

		   <a href="CalculateRPTOPBatch.php{Session}" class="navi" title="Calculate Taxes">Calculate Taxes</a>

		   &nbsp;&nbsp;
		   |
		   &nbsp;&nbsp;

		   <a href="SOA.php{Session}" class="navi" title="Payments">Payments</a>

		   &nbsp;&nbsp;
		   |
		   &nbsp;&nbsp;

		   <!-- BEGIN TreasuryMaintenanceLink -->
		   <a href="TreasuryMaintenanceHome.php{Session}" class="navi" title="Treasury Maintenance">Treasury Maintenance</a>
		   <!-- END TreasuryMaintenanceLink -->
		   <!-- BEGIN TreasuryMaintenanceLinkText -->
		   <font class="navi"><font color="#eeeeee">Treasury Maintenance</font></font>
		   <!-- END TreasuryMaintenanceLinkText -->

		   &nbsp;&nbsp;
		   |
		   &nbsp;&nbsp;

		   <a href="TreasuryReports.php{Session}" class="navi" title="Reports">Reports</a>

		   </td>
		  </tr>

		 </table></td>
		<td width="75"> <img SRC="images/nav/nav_a_08.jpg" WIDTH=75 HEIGHT=53 ></td>
	   </tr>
	  </table>
          </td>
          <td> <img SRC="images/inner_11.jpg" WIDTH=36 HEIGHT=53 ></td>
          <td> <img SRC="images/inner_12.jpg" WIDTH=17 HEIGHT=53 ></td>
        </tr>
        <tr> 
          
	 <td align="center" valign="top"> <img SRC="images/inner_13.jpg" WIDTH=18 HEIGHT=375 ></td>
          <td background="images/inner_14.jpg"> <img SRC="images/spacer.gif" WIDTH=27 HEIGHT=1 ></td>
          <td COLSPAN=3 align="left" valign="top" background="images/background/bg_middle.jpg" bgcolor="#CCCCCC"> 
            <table width="702" height="375" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td align="left" valign="top"> 
                  <!-- BEGIN RPTOPTable -->
		 <form action="RPTOPDetails.php{Session}" method="post" name="RPTOPForm" id="RPTOPForm">				  
		 <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
		  <tr> 
		   <td align="center" valign="top" class="subtitle"> <table width="90%" border="0" cellspacing="0" cellpadding="0">
		     <tr>
				<td colspan=2>&nbsp;</td>
			 </tr>
			 <tr> 
			  <td class="subtitle">RPTOP INFORMATION</td>
			  <td align="right" valign="top"><a href="#top"><img src="images/arrow_up.gif" width="40" height="30" border="0"></a></td>
			 </tr>
			 <tr>
			  <td colspan=2>
				<table border=0 cellpadding=0 cellspacing=0 width="100%">
				<tr>
					<td align=left class="subtitle">
						<br>
					    <font class="fields">
						&lt;&lt;
					    <a href="CalculateRPTOPDetails.php{Session}&rptopID={rptopID}">back to Calculate Details</a></b> 
					    </font>
					    <br>
					</td>
					<td align=right class="subtitle">
						<br>
					    <font class="fields">
					    <a href="PaymentDetails.php{Session}&rptopID={rptopID}">Apply Payments</a></b> 
						&gt;&gt;
					    </font>
					</td>
				</tr></table>
			  </td>
			 </tr>
			</table></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top">{msg}<img src="images/spacer.gif" width="10" height="15"></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top"> <table width="90%" border="0" cellspacing="1" cellpadding="2" class="fields">
			 <tr valign="top" bgcolor="#F6F6F6"> 
			  <td align="right" class="fileds_comment" width="25%">rptopNumber</td>
			  <td class="fields" width="75%"><b>{rptopNumber}</b><span class="fileds_comment"></span></td>
			 </tr>
			 <tr valign="top" bgcolor="#F6F6F6"> 
			  <td align="right" class="fileds_comment">taxabaleYear</td>
			  <td class="fileds_comment"><strong>{taxableYear}</strong></td>
			 </tr>
			 <tr valign="top" bgcolor="#F6F6F6"> 
			  <td align="right" class="fileds_comment">rptopDate</td>
			  <td class="fileds_comment"><strong>{rptopDate}</strong></td>
			 </tr>
			 <tr valign="top" bgcolor="#F6F6F6"> 
			  <td align="right" class="fileds_comment">cityAssessor</td>
			  <td class="fileds_comment"><strong>{cityAssessorName}</strong></td>
			 </tr>
			 <tr valign="top" bgcolor="#F6F6F6"> 
			  <td align="right" class="fileds_comment">cityTreasurer</td>
			  <td class="fileds_comment"><strong>{cityTreasurerName}</strong></td>
			 </tr>
			</table></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top"><img src="images/spacer.gif" width="10" height="15"></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top" class="subtitle"> <table width="90%" border="0" cellspacing="0" cellpadding="0">
			 <tr> 
			  <td class="subtitle">PROPERTY OWNER</td>
			  <td align="right" valign="top"><a href="#down"><img src="images/arrow_down.gif" width="40" height="30" border="0"></a></td>
			 </tr>
			</table></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top" class="title"><img src="images/spacer.gif" width="10" height="15"></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top">
			 <!-- BEGIN OwnerListTable -->
			 <table width="90%" border="0" cellspacing="0" cellpadding="0">
			  <tr> 
			   <td width="50%" class="mainnav" valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="2" height="100%">
				 <tr bgcolor="#F6F6F6"> 
				  <td class="fileds_comment" colspan="2">Owner - Person
				   <!-- BEGIN SearchOwnerPersonLink -->
				   <!-- END SearchOwnerPersonLink -->
				  </td>
				 </tr>
				 <!-- BEGIN PersonTable -->
				 <tr bgcolor="#F6F6F6"> 
				  <td class="fileds_comment" align="right" width="100">Name:</td>
				  <td>&nbsp;</td>
				 </tr>
				 <!-- BEGIN PersonList -->
				 <tr bgcolor="#F6F6F6"> 
				  <td>&nbsp;</td>
				  <td class="fileds_comment"><a href="javascript: openWin('PersonDetails.php{Session}&personID={personID}&formAction=viewOnly','popupWindow',50,50,350,400)" class="fields">{fullName}</a> 
				  </td>
				 </tr>
				 <!-- END PersonList -->
				 <!-- BEGIN PersonDBEmpty -->
				 <tr align="left" bgcolor="#F6F6F6"> 
				  <td>&nbsp;</td>				 
				  <td class="fileds_comment" valign="top">none</td>
				 </tr>
				 <!-- END PersonDBEmpty -->
				 <tr align="left" bgcolor="#F6F6F6"> 
				  <td class="fields" valign="top" colspan="2" height="100%">&nbsp;</td>
				 </tr>
				 <!-- END PersonTable -->
				</table></td>
			   <td width="50%" class="mainnav" valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="2" height="100%">
				 <tr bgcolor="#F6F6F6"> 
				  <td class="fileds_comment" colspan="2">Owner - Company
				   <!-- BEGIN SearchOwnerCompanyLink -->
				   <!-- END SearchOwnerCompanyLink -->
				  </td>
				 </tr>
				 <!-- BEGIN CompanyTable -->
				 <tr bgcolor="#F6F6F6"> 
				  <td class="fileds_comment" align="right" width="100">Company Name:</td>
				  <td>&nbsp;</td>
				 </tr>				 
				 <!-- BEGIN CompanyList -->
				 <tr bgcolor="#F6F6F6"> 
				  <td class="fileds_comment" valign="top" align="center" width="70">&nbsp;</td>
				  <td class="fileds_comment"><a href="javascript: openWin('CompanyDetails.php{Session} &companyID={companyID}&formAction=viewOnly','popupWindow',50,50,450,500)" class="fields">{companyName}</a></td>
				 </tr>
				 <!-- END CompanyList -->
				 <!-- BEGIN CompanyDBEmpty -->
				 <tr align="left" bgcolor="#F6F6F6"> 
				  <td class="fileds_comment" valign="top" align="center" width="70">&nbsp;</td>				 
				  <td class="fileds_comment" valign="top">none</td>
				 </tr>
				 <!-- END CompanyDBEmpty -->
				 <tr align="left" bgcolor="#F6F6F6"> 
				  <td class="fields" valign="top" colspan="2" height="100%">&nbsp;</td>
				 </tr>
				 <!-- END CompanyTable -->
				</table></td>
			  </tr>
			 </table>
			 <input type="hidden" name="formAction" value="remove">
			 <input type="hidden" name="ownerID" value="{ownerID}">
			 <!-- END OwnerListTable -->
			</td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top"><img src="images/spacer.gif" width="10" height="15"></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top" class="subtitle"> <table width="90%" border="0" cellspacing="0" cellpadding="0">
			 <tr> 
			  <td class="subtitle">STATEMENT OF ACCOUNT<a name="#td"></a></td>
			  <td align="right" valign="top"><a href="#top"><img src="images/arrow_up.gif" width="40" height="30" border="0"></a></td>
			 </tr>
			</table></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top"><img src="images/spacer.gif" width="10" height="15"></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top"> 
			<!-- BEGIN TDTable -->
			              <table width="90%" border="0" cellpadding="2" cellspacing="1">
                            <tr align="center"> 
								<td colspan="5" align="right">
								 <input type="button" value="PRINT Statement of RPTax" onClick="showPrintWindow('soa');" name="btnSOA" style="width:150px;">

								 <script language="Javascript">
									document.RPTOPForm.btnSOA.value = "Print \nStatement of RPTax";
								 </script>

								 <!-- BEGIN NoticeOfDelinquencyButton -->

								 <input type="button" value="PRINT Notice of Delinquency" onClick="showPrintWindow('delinquency');" name="btnDelinquency" style="width:150px;">

								 <script language="Javascript">
 									document.RPTOPForm.btnDelinquency.value = "Print \nNotice of Delinquency";
								 </script>

								 <!-- END NoticeOfDelinquencyButton -->
								</td>
                            </tr>
							<tr align="center"> 
                              <td width="15%" bgcolor="#CCCCCC" class="fileds_comment"><b>Show/Hide<br>
                                </b> <input type="checkbox" name="tdShowHide" value="1" onClick="toggleShowHide();" checked> 
                              </td>
                              <td width="20%" bgcolor="#CCCCCC" class="fileds_comment"><b>TD 
                                Number</b></td>
                              <td width="15%" bgcolor="#CCCCCC" class="fileds_comment"><strong>Assessed Value</strong> </td>
                              <td width="15%" bgcolor="#CCCCCC" class="fileds_comment"><b>Tax Due</b> </td>
                              <td width="15%" bgcolor="#CCCCCC" class="fileds_comment"><b>Net Due</b></td>
                            </tr>
                            <!-- BEGIN TDList -->
                            <tr align="left"> 
                              <td class="fileds_comment"  align="center" bgcolor="#F6F6F6" valign="middle"> 
                                <a name="#td{ctr}" id="#td{ctr}"></a> <input name="tdChk{ctr}" type="checkbox" id="tdChk{ctr}" onClick="toggle('{ctr}')" value="1" checked> 
                              </td>
                              <td class="fileds_comment"  align="center" bgcolor="#F6F6F6" valign="middle"><b>{taxDeclarationNumber}</b></td>
                              <td  align="right" class="fileds_comment" bgcolor="#F6F6F6" valign="middle">{assessedValue}</td>
                              <td  align="right" class="fileds_comment" bgcolor="#F6F6F6" valign="middle">{taxDue[Annual]}</td>
                              <td  align="right" class="fileds_comment" bgcolor="#F6F6F6" valign="middle">{netDue}</td>
                            </tr>
                            <tr id="tdRow{ctr}" align="left"> 
                              <td colspan="6"  align="center" valign="top" class="fileds_comment"> 
                                <table width="100%" border="0" cellspacing="1" cellpadding="5" align="center" class="fileds_comment" bgcolor="#000000">
                                  <!-- BEGIN TD -->
                                  <tr bgcolor="#F6F6F6"> 
                                    <td colspan="6" class="fileds_comment" valign="middle" align="left"><b>DECLARATION 
                                      OF PROPERTY</b></td>
                                  </tr>
                                  <tr bgcolor="#CCCCCC"> 
                                    <td colspan="6" class="fileds_comment" align="left" nowrap>Tax Declaration Details</td>
                                  </tr>
                                  <tr> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6" width="100">&nbsp;</td>
                                    <td colspan="5" bgcolor="#F6F6F6" class="fileds_comment"><strong>{taxDeclarationNumber} 
                                      </strong><br>
                                      (Tax Declaration Number) <br> </td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6" width="100">&nbsp;</td>								  
                                    <td colspan="5"><strong>{effectivity}</strong><br>(Effectivity)</td>
                                  </tr>
                                  <tr bgcolor="#CCCCCC"> 
                                    <td colspan="6" class="fileds_comment" align="left" nowrap>Property Details</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Property Type</td>
                                    <td colspan="5"><strong>{propertyType}</strong></td>
                                  </tr>									  						  								  
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Taxability</td>
                                    <td colspan="5"><strong>{taxability}</strong></td>
                                  </tr>								  
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Idle</td>
                                    <td colspan="5"><strong></strong>{idle}</strong></td>
                                  </tr>								  
                                  <tr> 
                                    <td class="fileds_comment" align="left" nowrap colspan="6" bgcolor="#CCCCCC">Assessments</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Market 
                                      Value </td>
                                    <td colspan="5"><strong>{marketValue}</strong></td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Assessed 
                                      Value </td>
                                    <td colspan="5"><strong>{assessedValue}</strong></td>
                                  </tr>
                                  <tr> 
                                    <td class="fileds_comment" align="left" nowrap colspan="" bgcolor="#CCCCCC">Tax Dues</td>
                                    <td class="fileds_comment" align="center" nowrap colspan="" bgcolor="#DDDDDD"><B>Annual</B></td>
                                    <td class="fileds_comment" align="center" nowrap colspan="" bgcolor="#DDDDDD"><B>Quarter 1</B></td>
                                    <td class="fileds_comment" align="center" nowrap colspan="" bgcolor="#DDDDDD"><B>Quarter 2</B></td>
                                    <td class="fileds_comment" align="center" nowrap colspan="" bgcolor="#DDDDDD"><B>Quarter 3</B></td>
                                    <td class="fileds_comment" align="center" nowrap colspan="" bgcolor="#DDDDDD"><B>Quarter 4</B></td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Due Date</td>
                                    <td align=right nowrap>{dueDate[Annual]}</td>
                                    <td align=right nowrap>{dueDate[Q1]}</td>
                                    <td align=right nowrap>{dueDate[Q2]}</td>
                                    <td align=right nowrap>{dueDate[Q3]}</td>
                                    <td align=right nowrap>{dueDate[Q4]}</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Basic 
                                      Tax </td>
                                    <td align=right><strong>{basicTax[Annual]}</strong></td>
                                    <td align=right>{basicTax[Q1]}</td>
                                    <td align=right>{basicTax[Q2]}</td>
                                    <td align=right>{basicTax[Q3]}</td>
                                    <td align=right>{basicTax[Q4]}</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">SEF 
                                      Tax </td>
                                    <td align=right><strong>{sefTax[Annual]}</strong></td>
                                    <td align=right>{sefTax[Q1]}</td>
                                    <td align=right>{sefTax[Q2]}</td>
                                    <td align=right>{sefTax[Q3]}</td>
                                    <td align=right>{sefTax[Q4]}</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Idle 
                                      Tax </td>
                                    <td align=right><strong>{idleTax[Annual]}</strong></td>
                                    <td align=right>{idleTax[Q1]}</td>
                                    <td align=right>{idleTax[Q2]}</td>
                                    <td align=right>{idleTax[Q3]}</td>
                                    <td align=right>{idleTax[Q4]}</td>
                                  </tr>								  
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Tax Due</td>
                                    <td align=right><strong>{taxDue[Annual]}</strong></td>
                                    <td align=right>{taxDue[Q1]}</td>
                                    <td align=right>{taxDue[Q2]}</td>
                                    <td align=right>{taxDue[Q3]}</td>
                                    <td align=right>{taxDue[Q4]}</td>
                                  </tr>
                                  <tr> 
                                    <td class="fileds_comment" align="left" nowrap colspan="6" bgcolor="#CCCCCC">Discounts  (as of {today})</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Advanced Payment</td>
									<td align="left" colspan="5"><strong>Annual - {advancedDiscountPercentage}</strong> ; <strong>Q1 - {q1AdvancedDiscountPercentage}</strong> ; <strong>Q2-Q4 - {discountPercentage}</strong> (for Payments made before January 1)</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Advanced Payment Discount</td>
                                    <td align=right><strong>({advancedPaymentDiscount[Annual]})</strong></td>
                                    <td align=right>({advancedPaymentDiscount[Q1]})</td>
                                    <td align=right>({advancedPaymentDiscount[Q2]})</td>
                                    <td align=right>({advancedPaymentDiscount[Q3]})</td>
                                    <td align=right>({advancedPaymentDiscount[Q4]})</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Early Payment</td>
                                    <td align="left" colspan=5><strong>{discountPercentage}</strong> (for Payments made within Discount Period or before Quarterly Due Date)</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Discount Period</td>
                                    <td align="left" colspan=5><strong>{discountPeriod}</strong> (for Early Payments)</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Early Payment Discount</td>
                                    <td align=right><strong>({earlyPaymentDiscount[Annual]})</strong></td>
                                    <td align=right>({earlyPaymentDiscount[Q1]})</td>
                                    <td align=right>({earlyPaymentDiscount[Q2]})</td>
                                    <td align=right>({earlyPaymentDiscount[Q3]})</td>
                                    <td align=right>({earlyPaymentDiscount[Q4]})</td>
                                  </tr>



                                  <tr> 
                                    <td class="fileds_comment" align="left" nowrap colspan="6" bgcolor="#CCCCCC">
										Penalties (as of {today})
									</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Months Over Due</td>
                                    <td align=right><strong>{monthsOverDue[Annual]} mo.</strong></td>
                                    <td align=right>{monthsOverDue[Q1]} mo.</td>
                                    <td align=right>{monthsOverDue[Q2]} mo.</td>
                                    <td align=right>{monthsOverDue[Q3]} mo.</td>
                                    <td align=right>{monthsOverDue[Q4]} mo.</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Penalty Percentage</td>
                                    <td align=right><strong>{penaltyPercentage[Annual]}%</strong></td>
                                    <td align=right>{penaltyPercentage[Q1]}%</td>
                                    <td align=right>{penaltyPercentage[Q2]}%</td>
                                    <td align=right>{penaltyPercentage[Q3]}%</td>
                                    <td align=right>{penaltyPercentage[Q4]}%</td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Penalty</td>
                                    <td align=right><strong>{penalty[Annual]}</strong><input type="hidden" name="penalty[{ctr}][Annual]" id="penalty[{ctr}][Annual]" value="{penalty[Annual]}"></td>
                                    <td align=right>{penalty[Q1]}<input type="hidden" name="penalty[{ctr}][Q1]" id="penalty[{ctr}][Q1]" value="{penalty[Q1]}"></td>
                                    <td align=right>{penalty[Q2]}<input type="hidden" name="penalty[{ctr}][Q2]" id="penalty[{ctr}][Q2]" value="{penalty[Q2]}"></td>
                                    <td align=right>{penalty[Q3]}<input type="hidden" name="penalty[{ctr}][Q3]" id="penalty[{ctr}][Q3]" value="{penalty[Q3]}"></td>
                                    <td align=right>{penalty[Q4]}<input type="hidden" name="penalty[{ctr}][Q4]" id="penalty[{ctr}][Q4]" value="{penalty[Q4]}"></td>
                                  </tr>
                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Amnesty</td>
                                    <td align=right><strong>{amnesty[Annual]}</strong><input type="hidden" name="amnesty[{ctr}][Annual]" id="amnesty[{ctr}][Annual]" value="{amnesty[Annual]}"></td>
                                    <td align=right>{amnesty[Q1]}<input type="hidden" name="amnesty[{ctr}][Q1]" id="amnesty[{ctr}][Q1]" value="{amnesty[Q1]}"></td>
                                    <td align=right>{amnesty[Q2]}<input type="hidden" name="amnesty[{ctr}][Q2]" id="amnesty[{ctr}][Q2]" value="{amnesty[Q2]}"></td>
                                    <td align=right>{amnesty[Q3]}<input type="hidden" name="amnesty[{ctr}][Q3]" id="amnesty[{ctr}][Q3]" value="{amnesty[Q3]}"></td>
                                    <td align=right>{amnesty[Q4]}<input type="hidden" name="amnesty[{ctr}][Q4]" id="amnesty[{ctr}][Q4]" value="{amnesty[Q4]}"></td>
                                  </tr>

                                  <tr> 
                                    <td class="fileds_comment" align="left" nowrap colspan="6" bgcolor="#CCCCCC">
										Backtaxes
									</td>
                                  </tr>
								  <tr>
                                    <td class="fileds_comment" align="center" nowrap colspan="6" bgcolor="#F6F6F6">

									<!-- BEGIN BacktaxesTable -->

									<table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#000000">
									<tr align="center" bgcolor="#CCCCCC" class="fileds_comment"> 
										<td><strong>Show/Hide</strong></td>
										<td><strong>TD Number</strong></td>
										<td><strong>Year</strong></td>
										<td><strong>Assessed Value</strong></td>
										<td><strong>Tax Due</strong></td>
										<td><strong>Balance</strong></td>
									</tr>

									<!-- BEGIN BacktaxesList -->
									<tr bgcolor="#F6F6F6" class="fileds_comment">
										<td align="center"><input type="checkbox" onClick="toggleBacktaxTD('{backtaxTDID}');"></td>
										<td>{tdNumberB}</td>
										<td align=center>{startYearB}</td>
										<td align=right>{assessedValueB}</td>
										<td align=right>{totalTaxDueB}</td>
										<td align=right><strong>{balanceB}</strong></td>
									</tr>
									<tr bgcolor="#eeeeee" id="backtaxTD{backtaxTDID}" style="display:none;">
										<td colspan=6 class="fileds_comment">
											<table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#777777">
											<tr bgcolor="#EEEEEE" class="fileds_comment">
												<td align="right" width="150">Tax Declaration Number :</td>
												<td align="left">{tdNumberB}</td>
											</tr>
											<tr bgcolor="#EEEEEE" class="fileds_comment">
												<td align="right" width="150">Year :</td>
												<td align="left">{startYearB}</td>
											</tr>
											<tr bgcolor="#EEEEEE" class="fileds_comment">
												<td align="right" width="150">Start Quarter :</td>
												<td align="left">{startQuarterB}</td>
											</tr>
											<tr bgcolor="#EEEEEE" class="fileds_comment">
												<td align="right" width="150">Assessed Value :</td>
												<td align="left">{assessedValueB}</td>
											</tr>
											<tr bgcolor="#EEEEEE" class="fileds_comment">
												<td align="right" width="150">Basic Tax :</td>
												<td align="left">{basicTaxB} (Rate: {basicRateB})</td>
											</tr>
											<tr bgcolor="#EEEEEE" class="fileds_comment">
												<td align="right" width="150">SEF Tax :</td>
												<td align="left">{sefTaxB} (Rate: {sefRateB})</td>
											</tr>
											<tr bgcolor="#EEEEEE" class="fileds_comment">
												<td align="right" width="150">Tax Due :</td>
												<td align="left">{totalTaxDueB}</td>
											</tr>
											<tr bgcolor="#EEEEEE" class="fileds_comment">
												<td align="right" width="150">Penalties :</td>
												<td align="left">{penaltiesB} {amnestyB}</td>
											</tr>
											<tr bgcolor="#EEEEEE" class="fileds_comment">
												<td align="right" width="150">Paid :</td>
												<td align="left">{paidB}</td>
											</tr>
											<tr bgcolor="#EEEEEE" class="fileds_comment">
												<td align="right" width="150">Balance :</td>
												<td align="left">{balanceB}</td>
											</tr>
											</table>
										</td>
									</tr>
									<!-- END BacktaxesList -->
									</table>

									<!-- END BacktaxesTable -->
									</td>
                                  </tr>
                                  <tr> 
                                    <td class="fileds_comment" align="left" nowrap colspan="6" bgcolor="#CCCCCC">
										Balance Summary
									</td>
                                  </tr>

                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Initial Net Due For this Year</td>
                                    <td align=right><strong>{initialNetDue[Annual]}</strong></td>
                                    <td align=right>{initialNetDue[Q1]}</td>
                                    <td align=right>{initialNetDue[Q2]}</td>
                                    <td align=right>{initialNetDue[Q3]}</td>
                                    <td align=right>{initialNetDue[Q4]}</td>
                                  </tr>

                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Total Backtaxes Balance</td>
                                    <td class="fileds_comment" align="left" valign="middle" nowrap bgcolor="#F6F6F6" colspan=5>
										<table border=0 cellpadding=0 cellspacing=0>
										<tr>
											<td class="fileds_comment" width="74" align="right">
												<b>{totalBacktaxesBalance}</b>
											</td>
										</tr>
										</table>
									</td>
                                  </tr>

                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Total Paid</td>
                                    <td class="fileds_comment" align="left" valign="middle" nowrap bgcolor="#F6F6F6" colspan=5>
										<table border=0 cellpadding=0 cellspacing=0>
										<tr>
											<td class="fileds_comment" width="74" align="right">
												<b>({totalPaid})</b>
											</td>
											<td class="fileds_comment" align="left">
												&nbsp;&nbsp;&nbsp;
											</td>
										</tr>
										</table>
									</td>
                                  </tr>

                                  <tr bgcolor="#F6F6F6"> 
                                    <td class="fileds_comment" align="right" valign="middle" nowrap bgcolor="#F6F6F6">Net Due</td>
                                    <td align=right><strong>{netDue[Annual]}</strong><input type="hidden" name="netDue[{ctr}][Annual]" id="netDue[{ctr}][Annual]" value="{netDue[Annual]}"></td>
                                    <td align=right>{netDue[Q1]}<input type="hidden" name="netDue[{ctr}][Q1]" id="netDue[{ctr}][Q1]" value="{netDue[Q1]}"></td>
                                    <td align=right>{netDue[Q2]}<input type="hidden" name="netDue[{ctr}][Q2]" id="netDue[{ctr}][Q2]" value="{netDue[Q2]}"></td>
                                    <td align=right>{netDue[Q3]}<input type="hidden" name="netDue[{ctr}][Q3]" id="netDue[{ctr}][Q3]" value="{netDue[Q3]}"></td>
                                    <td align=right>{netDue[Q4]}<input type="hidden" name="netDue[{ctr}][Q4]" id="netDue[{ctr}][Q4]" value="{netDue[Q4]}"></td>
                                  </tr>

                                  <!-- END TD -->
                                </table></td>
                            </tr>
                            <!-- END TDList -->
                            <!-- BEGIN TDDBEmpty -->
                            <tr align="left"> 
                              <td class="fileds_comment" colspan="7" bgcolor="#F6F6F6" valign="middle">none</td>
                            </tr>
                            <!-- END TDDBEmpty -->
                          </table>
			<!-- END TDTable -->
		   </td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top"><img src="images/spacer.gif" width="10" height="15"></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top" class="subtitle"> <table width="90%" border="0" cellspacing="0" cellpadding="0">
			 <tr> 
			  <td class="subtitle">TOTALS<a name="#td"></a></td>
			  <td align="right" valign="top"><a href="#top"><img src="images/arrow_up.gif" width="40" height="30" border="0"></a></td>
			 </tr>
			</table></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top"><img src="images/spacer.gif" width="10" height="15"></td>
		  </tr>		  
		  <tr> 
		   <td align="center" valign="top"> <table width="90%" border="0" cellspacing="1" cellpadding="2" class="fields">
			 <tr align="center" valign="top" bgcolor="#CCCCCC"> 
			  <td width="25%" class="fileds_comment">&nbsp;</td>
			  <td width="25%" class="fileds_comment">Assessed Value</td>
			  <td width="25%" class="fileds_comment">Tax Due</td>
			  <td width="25%" class="fileds_comment">Net Due</td>
			 </tr>
			 <tr valign="top" bgcolor="#F6F6F6"> 
			  <td align="center" class="fileds_comment">Totals</td>
			  <td align="right" class="fileds_comment"><strong>{totalAssessedValue}</strong></td>
			  <td align="right" class="fileds_comment"><strong>{totalTaxDue}</strong></td>
			  <td align="right" class="fileds_comment"><strong>{totalNetDue}</strong><input type="hidden" name="totalNetDue" id="totalNetDue" value="{totalNetDue}"></td>
			 </tr>
			</table></td>
		  </tr>
 		  <tr>
		      <td class="subtitle">
				<table border=0 cellpadding=0 cellspacing=0 width="100%">
				<tr>
					<td align=left class="subtitle">
						<br><br>
					    <font class="fields">
						&lt;&lt;
					    <a href="CalculateRPTOPDetails.php{Session}&rptopID={rptopID}">back to Calculate Details</a></b> 
					    </font>
					    <br><br>
					</td>
					<td align=right class="subtitle">
						<br><br>
					    <font class="fields">
					    <a href="PaymentDetails.php{Session}&rptopID={rptopID}">Apply Payments</a></b> 
						&gt;&gt;
					    </font>
					</td>
				</tr></table>
		      </td>
		  </tr>		  
		  <tr> 
		   <td align="center" valign="top"><img src="images/spacer.gif" width="10" height="15"><a name="#down"></a></td>
		  </tr>
		  <tr> 
		   <td align="center" valign="top" class="fileds_comment">Tampering with 
			this system is criminally punishable under Philippine Laws.<br> &copy; 
			Republic of the Philippines National Computer Center. All Rights Reserved. 
		   </td>
		  </tr>
		 </table>
	 			  </form>
				  <!-- END RPTOPTable -->
                </td>
              </tr>
            </table>
          </td>
          <td background="images/inner_16.jpg"> <img SRC="images/spacer.gif " WIDTH=36 HEIGHT=375 ></td>
          <td> <img SRC="images/inner_17.jpg" WIDTH=17 HEIGHT=375 ></td>
        </tr>
        <tr> 
          <td> <img SRC="images/inner_18.jpg" WIDTH=18 HEIGHT=39></td>
          <td> <img SRC="images/inner_19.jpg" WIDTH=27 HEIGHT=39></td>
          <td> <img SRC="images/inner_20.jpg" WIDTH=355 HEIGHT=39></td>
          <td> <img SRC="images/inner_21.jpg" WIDTH=243 HEIGHT=39></td>
          <td> <img SRC="images/inner_22.jpg" WIDTH=104 HEIGHT=39></td>
          <td> <img SRC="images/inner_23.jpg" WIDTH=36 HEIGHT=39></td>
          <td> <img SRC="images/inner_24.jpg" WIDTH=17 HEIGHT=39></td>
        </tr>
      </table>
    </td>
  </tr>
</table>

</body>
</html>
